home *** CD-ROM | disk | FTP | other *** search
-
- #include <stdio.h>
- #include <stdlib.h>
-
- #ifdef __ZTC__
- /*
- #define NO_HANDLE 1
- */
- #include <handle.h>
- #else
- #define __handle
- #define handle_calloc(a) calloc((a),1)
- #endif
-
- main()
- {
-
- int i;
- void __handle *p;
-
- i=0;
- for ( ; ; )
- {
- printf("%d\r",i++);
- p=handle_calloc(500);
- if ( p == NULL )
- break;
- }
- printf("\nAllocated %d items\n", i);
- printf("Allocated %ld bytes\n", (long) i * 500 );
- }
-
-
-